package org.csmzxy.class2333;

import javax.imageio.plugins.jpeg.JPEGQTable;

public class Pet {
    private String type;
    private int age;
    private boolean vaccinum;

    public void setType(String type){
        this.type = type;
    }
    public void setAge(int age){
        this.age = age;
    }
    public void setVaccinum(boolean vaccinum){
        this.vaccinum = vaccinum;
    }
    public String getType(){
        return type;
    }
    public int getAge(){
        return age;
    }
    public boolean getHealth(){
        return vaccinum;
    }
    public static void main(String[] args){
        Pet pet1 = new Pet();
        pet1.setType("dog");
        pet1.setAge(2);
        pet1.setVaccinum(true);

        Pet pet2 = new Pet();
        pet2.setType("cat");
        pet2.setAge(3);
        pet2.setVaccinum(false);

        System.out.println("宠物的类型为:" + pet1.getType() + "宠物的年龄为:" + pet1.getAge() + "宠物是否接种疫苗：" + pet1.getHealth());
        System.out.println("宠物的类型为:" + pet2.getType() + "宠物的年龄为:" + pet2.getAge() + "宠物是否接种疫苗：" + pet2.getHealth());
    }
}